using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace PeDALS.Tools.AZ.PSTArchive.PSTData
{
    public class PSTMap
    {
        private PageTypes mptType;
        private long mlngInitialOffset;
        private byte[] mdwPadding = new byte[4];
        private byte[] mrgbMapBits;
        private PSTPageTrailer mptTrailer;

        public PSTMap(byte[] baBaseMap)
        {
            mrgbMapBits = new byte[128];
            mrgbMapBits = baBaseMap;
        }

        public PSTMap(BinaryReader brReader, PageTypes ptType, bool blnUnicode)
        {
            mptType = ptType;
            mlngInitialOffset = brReader.BaseStream.Position;
            if (!blnUnicode) mdwPadding = brReader.ReadBytes(4);
            mrgbMapBits = new byte[496];
            mrgbMapBits = brReader.ReadBytes(496);
            mptTrailer = new PSTPageTrailer(brReader, blnUnicode);
        }

        public byte[] dwPadding
        {
            get
            {
                return mdwPadding;
            }
            set
            {
                mdwPadding = value;
            }
        }

        public byte[] rgbMapBits
        {
            get
            {
                return mrgbMapBits;
            }
            set
            {
                mrgbMapBits = value;
            }
        }

        public PSTPageTrailer PageTrailer
        {
            get
            {
                return mptTrailer;
            }
            set
            {
                mptTrailer = value;
            }
        }
    }
}
